<!DOCTYPE html>
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>主页</title>

<link href="/iagriculture/css/bootstrap.min.css" rel="stylesheet">
<link href="/iagriculture/font-awesome/css/font-awesome.css"
	rel="stylesheet">

<!-- Toastr style -->
<link href="/iagriculture/css/plugins/toastr/toastr.min.css"
	rel="stylesheet">

<!-- Gritter -->
<link href="/iagriculture/js/plugins/gritter/jquery.gritter.css"
	rel="stylesheet">

<link href="/iagriculture/css/animate.css" rel="stylesheet">
<link href="/iagriculture/css/style.css" rel="stylesheet">

</head>

<body>
	<div id="wrapper">
		<nav class="navbar-default navbar-static-side" role="navigation">
			<div class="sidebar-collapse">
				<ul class="nav metismenu" id="side-menu">
					<li class="nav-header">
						<div class="dropdown profile-element">
							<span> <img alt="image" class="img-circle"
								src="/iagriculture/img/profile_small.jpg" />
							</span> <a data-toggle="dropdown" class="dropdown-toggle" href="#">
								<span class="clear"> <span class="block m-t-xs"> <strong
										class="font-bold">David Williams</strong>
								</span> <span class="text-muted text-xs block">Art Director <b
										class="caret"></b></span>
							</span>
							</a>
							<ul class="dropdown-menu animated fadeInRight m-t-xs">
								<li><a href="profile.html">Profile</a></li>
								<li><a href="contacts.html">Contacts</a></li>
								<li><a href="mailbox.html">Mailbox</a></li>
								<li class="divider"></li>
								<li><a href="login.html">Logout</a></li>
							</ul>
						</div>
						<div class="logo-element">IN+</div>
					</li>
					<li class="active"><a href="/iagriculture/index/"><i
							class="fa fa-th-large"></i> <span class="nav-label">个人主页</span></a></li>
					<li><a href="/iagriculture/index/fazhi"><i
							class="fa fa-flask"></i> <span class="nav-label">数据管理</span></a></li>
					<li><a href="/iagriculture/index/shebei"><i
							class="fa fa-flask"></i> <span class="nav-label">设备管理</span></a></li>
					<li><a href="/iagriculture/index/light"><i
							class="fa fa-diamond"></i> <span class="nav-label">光照检测</span></a></li>
					<li><a href="/iagriculture/index/daqiya"><i
							class="fa fa-bar-chart-o"></i> <span class="nav-label">大气压检测</span></a></li>
					<li><a href="/iagriculture/index/shuifen"><i
							class="fa fa-envelope"></i> <span class="nav-label">土壤水分检测
						</span></a></li>
					<li><a href="/iagriculture/index/kqwendu"><i
							class="fa fa-pie-chart"></i> <span class="nav-label">空气温度检测</span>
					</a></li>
					<li><a href="/iagriculture/index/kqshidu"><i
							class="fa fa-pie-chart"></i> <span class="nav-label">空气湿度检测</span>
					</a></li>

					<li><a href="/iagriculture/index/yewei"><i
							class="fa fa-desktop"></i> <span class="nav-label">液位检测</span> </a></li>
					<li><a href="/iagriculture/index/yushui"><i
							class="fa fa-files-o"></i> <span class="nav-label">雨水检测</span></a></li>
				</ul>

			</div>
		</nav>

		<div id="page-wrapper" class="gray-bg dashbard-1">
			<div class="row border-bottom">
				<nav class="navbar navbar-static-top" role="navigation"
					style="margin-bottom: 0">
					<div class="navbar-header">
						<a class="navbar-minimalize minimalize-styl-2 btn btn-primary "
							href="#"><i class="fa fa-bars"></i> </a>
						<form role="search" class="navbar-form-custom"
							action="search_results.html">
							<div class="form-group">
								<input type="text" placeholder="Search for something..."
									class="form-control" name="top-search" id="top-search">
							</div>
						</form>
					</div>
					<ul class="nav navbar-top-links navbar-right">
						<li><span class="m-r-sm text-muted welcome-message">欢迎来到智能农业后台管理系统</span></li>
						<li class="dropdown"><a class="dropdown-toggle count-info"
							data-toggle="dropdown" href="#"> <i class="fa fa-envelope"></i>
								<span class="label label-warning">1</span>
						</a>
							<ul class="dropdown-menu dropdown-messages">
								<li>
									<div class="dropdown-messages-box">
										<a href="profile.html" class="pull-left"> <img alt="image"
											class="img-circle" src="/iagriculture/img/a7.jpg">
										</a>
										<div class="media-body">
											<small class="pull-right">46h ago</small> <strong>Mike
												Loreipsum</strong> started following <strong>Monica Smith</strong>. <br>
											<small class="text-muted">3 days ago at 7:58 pm -
												10.06.2014</small>
										</div>
									</div>
								</li>
								<li class="divider"></li>
								<li>
									<div class="text-center link-block">
										<a href="mailbox.html"> <i class="fa fa-envelope"></i> <strong>Read
												All Messages</strong>
										</a>
									</div>
								</li>
							</ul></li>
						<li class="dropdown"><a class="dropdown-toggle count-info"
							data-toggle="dropdown" href="#"> <i class="fa fa-bell"></i> <span
								class="label label-primary">1</span>
						</a>
							<ul class="dropdown-menu dropdown-alerts">
								<li><a href="mailbox.html">
										<div>
											<i class="fa fa-envelope fa-fw"></i> You have 16 messages <span
												class="pull-right text-muted small">4 minutes ago</span>
										</div>
								</a></li>
								<li class="divider"></li>
								<li>
									<div class="text-center link-block">
										<a href="notifications.html"> <strong>See All
												Alerts</strong> <i class="fa fa-angle-right"></i>
										</a>
									</div>
								</li>
							</ul></li>


						<li><a href="login.html"> <i class="fa fa-sign-out"></i>
								Log out
						</a></li>
						<li><a class="right-sidebar-toggle"> <i
								class="fa fa-tasks"></i>
						</a></li>
					</ul>

				</nav>
			</div>
			<!--start 个人主页 -->
			<div class="row wrapper border-bottom white-bg page-heading">
				<div class="col-lg-9">
					<h2>个人主页</h2>
					<ol class="breadcrumb">
						<li><a href="index.html">主页</a></li>
						<li class="active"><strong>个人主页</strong></li>
					</ol>
				</div>
				<div class="col-lg-3" style="height: 80px">
					<div class="widget style1 navy-bg" style="height: 80px">
						<div class="row">
							<div class="col-xs-4">
								<i class="fa fa-cloud fa-5x"></i>
							</div>
							<div class="col-xs-8 text-right">
								<span id="cityName"> Today degrees </span>
								<h2 class="font-bold" id="tmp">20'C</h2>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--end 个人主页 -->

			<div class="wrapper wrapper-content">
				<div class="row animated fadeInRight">
					<div class="col-md-4">
						<div class="ibox float-e-margins">
							<div class="ibox-title">
								<h5>个人资料</h5>
							</div>
							<div>
								<div class="ibox-content no-padding border-left-right">
									<img alt="image" class="img-responsive"
										src="/iagriculture/img/profile_big.jpg">
								</div>
								<div class="ibox-content profile-content">
									<h4>
										<strong>Xiang Lang</strong>
									</h4>
									<p>
										<i class="fa fa-map-marker"></i> Riviera State 32/106
									</p>
									<ul class="list-unstyled m-t-md">
										<li><span class="fa fa-envelope m-r-xs"></span> <label>Email:</label>
											1329172872@qq.com</li>
										<li><span class="fa fa-home m-r-xs"></span> <label>Address:</label>
											Street 200, Avenue 10</li>
										<li><span class="fa fa-phone m-r-xs"></span> <label>Contact:</label>
											17341930058</li>
									</ul>
									<div class="user-button">
										<button type="button"
											class="btn btn-block btn-outline btn-primary">编辑</button>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="col-md-8">
						<div class="ibox float-e-margins">
							<div class="ibox-title">
								<h5>每日任务</h5>
								<div class="ibox-tools">
									<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
									</a> <a class="dropdown-toggle" data-toggle="dropdown" href="#">
										<i class="fa fa-wrench"></i>
									</a> <a class="close-link"> <i class="fa fa-times"></i>
									</a>
								</div>
							</div>
							<div class="ibox-content">
								<h3>To-do</h3>
								<p class="small">
									<i class="fa fa-hand-o-up"></i> 任务清单
								</p>

								<div class="input-group">
									<input type="text" placeholder="Add new task. "
										class="input input-sm form-control"> <span
										class="input-group-btn">
										<button type="button" class="btn btn-sm btn-white">
											<i class="fa fa-plus"></i> 添加
										</button>
									</span>
								</div>

								<ul class="sortable-list connectList agile-list ui-sortable">
									<li class="warning-element">任务1
										<div class="agile-detail">
											<a href="#" class="pull-right btn btn-xs btn-white">Tag</a> <i
												class="fa fa-clock-o"></i> 12.10.2015
										</div>
									</li>
									<li class="success-element">任务2
										<div class="agile-detail">
											<a href="#" class="pull-right btn btn-xs btn-white">Mark</a>
											<i class="fa fa-clock-o"></i> 05.04.2015
										</div>
									</li>
									<li class="info-element">任务3
										<div class="agile-detail">
											<a href="#" class="pull-right btn btn-xs btn-white">Mark</a>
											<i class="fa fa-clock-o"></i> 16.11.2015
										</div>
									</li>
									<li class="danger-element">任务4
										<div class="agile-detail">
											<a href="#" class="pull-right btn btn-xs btn-primary">Done</a>
											<i class="fa fa-clock-o"></i> 06.10.2015
										</div>
									</li>
								</ul>

							</div>

						</div>
					</div>

				</div>
			</div>
		</div>
	</div>



	<div class="small-chat-box fadeInRight animated">

		<div class="heading" draggable="true">
			<small class="chat-date pull-right"> 02.19.2015 </small> Small chat
		</div>

		<div class="content">

			<div class="left">
				<div class="author-name">
					Monica Jackson <small class="chat-date"> 10:02 am </small>
				</div>
				<div class="chat-message active">Lorem Ipsum is simply dummy
					text input.</div>

			</div>
			<div class="right">
				<div class="author-name">
					Mick Smith <small class="chat-date"> 11:24 am </small>
				</div>
				<div class="chat-message">Lorem Ipsum is simpl.</div>
			</div>
		</div>
		<div class="form-chat">
			<div class="input-group input-group-sm">
				<input type="text" class="form-control"> <span
					class="input-group-btn">
					<button class="btn btn-primary" type="button">Send</button>
				</span>
			</div>
		</div>

	</div>
	<div id="small-chat">

		<span class="badge badge-warning pull-right">5</span> <a
			class="open-small-chat"> <i class="fa fa-comments"></i>

		</a>
	</div>
	<div id="right-sidebar">
		<div class="sidebar-container">

			<ul class="nav nav-tabs navs-3">

				<li class="active"><a data-toggle="tab" href="#tab-1">
						Notes </a></li>
				<li><a data-toggle="tab" href="#tab-2"> Projects </a></li>
				<li class=""><a data-toggle="tab" href="#tab-3"> <i
						class="fa fa-gear"></i>
				</a></li>
			</ul>

			<div class="tab-content">


				<div id="tab-1" class="tab-pane active">

					<div class="sidebar-title">
						<h3>
							<i class="fa fa-comments-o"></i> Latest Notes
						</h3>
						<small><i class="fa fa-tim"></i> You have 10 new message.</small>
					</div>

					<div>
						<div class="sidebar-message">
							<a href="#">
								<div class="pull-left text-center">
									<img alt="image" class="img-circle message-avatar"
										src="/iagriculture/img/a2.jpg" />
								</div>
								<div class="media-body">
									The point of using Lorem Ipsum is that it has a more-or-less
									normal. <br> <small class="text-muted">Yesterday
										2:45 pm</small>
								</div>
							</a>
						</div>
					</div>

				</div>

				<div id="tab-2" class="tab-pane">

					<div class="sidebar-title">
						<h3>
							<i class="fa fa-cube"></i> Latest projects
						</h3>
						<small><i class="fa fa-tim"></i> You have 14 projects. 10
							not completed.</small>
					</div>

					<ul class="sidebar-list">
						<li><a href="#">
								<div class="small pull-right m-t-xs">9 hours ago</div>
								<h4>Business valuation</h4> It is a long established fact that a
								reader will be distracted.

								<div class="small">Completion with: 22%</div>
								<div class="progress progress-mini">
									<div style="width: 22%;"
										class="progress-bar progress-bar-warning"></div>
								</div>
								<div class="small text-muted m-t-xs">Project end: 4:00 pm
									- 12.06.2014</div>
						</a></li>
					</ul>

				</div>

				<div id="tab-3" class="tab-pane">

					<div class="sidebar-title">
						<h3>
							<i class="fa fa-gears"></i> Settings
						</h3>
						<small><i class="fa fa-tim"></i> You have 14 projects. 10
							not completed.</small>
					</div>

					<div class="setings-item">
						<span> Show notifications </span>
						<div class="switch">
							<div class="onoffswitch">
								<input type="checkbox" name="collapsemenu"
									class="onoffswitch-checkbox" id="example"> <label
									class="onoffswitch-label" for="example"> <span
									class="onoffswitch-inner"></span> <span
									class="onoffswitch-switch"></span>
								</label>
							</div>
						</div>
					</div>
					<div class="sidebar-content">
						<h4>Settings</h4>
						<div class="small">I belive that. Lorem Ipsum is simply
							dummy text of the printing and typesetting industry. And
							typesetting industry. Lorem Ipsum has been the industry's
							standard dummy text ever since the 1500s. Over the years,
							sometimes by accident, sometimes on purpose (injected humour and
							the like).</div>
					</div>

				</div>
			</div>

		</div>



	</div>
	</div>

	<!-- Mainly scripts -->
	<script src="/iagriculture/js/jquery-2.1.1.js"></script>
	<script src="/iagriculture/js/bootstrap.min.js"></script>
	<script src="/iagriculture/js/plugins/metisMenu/jquery.metisMenu.js"></script>
	<script
		src="/iagriculture/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

	<!-- Flot -->
	<script src="/iagriculture/js/plugins/flot/jquery.flot.js"></script>
	<script src="/iagriculture/js/plugins/flot/jquery.flot.tooltip.min.js"></script>
	<script src="/iagriculture/js/plugins/flot/jquery.flot.spline.js"></script>
	<script src="/iagriculture/js/plugins/flot/jquery.flot.resize.js"></script>
	<script src="/iagriculture/js/plugins/flot/jquery.flot.pie.js"></script>

	<!-- Peity -->
	<script src="/iagriculture/js/plugins/peity/jquery.peity.min.js"></script>
	<script src="/iagriculture/js/demo/peity-demo.js"></script>

	<!-- Custom and plugin javascript -->
	<script src="/iagriculture/js/inspinia.js"></script>
	<script src="/iagriculture/js/plugins/pace/pace.min.js"></script>

	<!-- jQuery UI -->
	<script src="/iagriculture/js/plugins/jquery-ui/jquery-ui.min.js"></script>

	<!-- GITTER -->
	<script src="/iagriculture/js/plugins/gritter/jquery.gritter.min.js"></script>

	<!-- Sparkline -->
	<script
		src="/iagriculture/js/plugins/sparkline/jquery.sparkline.min.js"></script>

	<!-- Sparkline demo data  -->
	<script src="/iagriculture/js/demo/sparkline-demo.js"></script>

	<!-- ChartJS-->
	<script src="/iagriculture/js/plugins/chartJs/Chart.min.js"></script>

	<!-- Toastr -->
	<script src="/iagriculture/js/plugins/toastr/toastr.min.js"></script>


	<script>
		$(document).ready(function() {
			setTimeout(function() {
				toastr.options = {
					closeButton : true,
					progressBar : true,
					showMethod : 'slideDown',
					timeOut : 4000
				};
				toastr.success('Responsive Admin Theme', '欢迎来到智能农业系统');

			}, 1300);

			$.ajax({
				url : '/iagriculture/index/localcity',
				type : 'GET',
				dataType : "text",
				success : function(d) {
					var rdata = JSON.parse(d);
					//alert(d);	
					$('#cityName').html(rdata.data);
					var city = rdata.data.split('省')[1].split('市')[0];
					//alert(city);
					getWeather(city);
				}
			});
		});

		//通过城市获取天气信息
		function getWeather(city) {
			$.ajax({
				url : 'https://free-api.heweather.com/s6/weather/now?location='
						+ city + '&key=c7704495c8ba4f42bc1f0eb46ddbda9f',
				type : 'GET',
				dataType : "text",
				success : function(d) {
					var rdata = JSON.parse(d);
					$('#tmp').html(rdata.HeWeather6[0].now.tmp + '℃');
				}
			});
		}
	</script>


</body>
</html>
